const Router = require('koa-router')

const goodsRouter = new Router({prefix: '/goods'})

const {
  goodsDetailInfo,
  goodsSkuAndAttrDetailInfo,
  goodsSearch,
  goodsSkuStock
} = require('../controllers/goods.controller') 

goodsRouter.get('/:id', goodsDetailInfo)
goodsRouter.get('/:id/sku', goodsSkuAndAttrDetailInfo)
goodsRouter.get('/', goodsSearch)
goodsRouter.get('/:id/sku/:skuId/stock', goodsSkuStock)

module.exports = goodsRouter